Distributional convergence for the number of symbol comparisons used by QuickSort

نویسنده

  • James Allen Fill
چکیده

Most previous studies of the sorting algorithm QuickSort have used the number of key comparisons as a measure of the cost of executing the algorithm. Here we suppose that the n independent and identically distributed (iid) keys are each represented as a sequence of symbols from a probabilistic source and that QuickSort operates on individual symbols, and we measure the execution cost as the number of symbol comparisons. Assuming only a mild “tameness” condition on the source, we show that there is a limiting distribution for the number of symbol comparisons after normalization: first centering by the mean and then dividing by n. Additionally, under a condition that grows more restrictive as p increases, we have convergence of moments of orders p and smaller. In particular, we have convergence in distribution and convergence of moments of every order whenever the source is memoryless, i.e., whenever each key is generated as an infinite string of iid symbols. This is somewhat surprising: Even for the classical model that each key is an iid string of unbiased (“fair”) bits, the mean exhibits periodic fluctuations of order n.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Approximating the limiting Quicksort distribution

The limiting distribution of the normalized number of comparisons used by Quicksort to sort an array of n numbers is known to be the unique fixed point with zero mean of a certain distributional transformation S. We study the convergence to the limiting distribution of the sequence of distributions obtained by iterating the transformation S, beginning with a (nearly) arbitrary starting distribu...

متن کامل

The limiting distribution for the number of symbol comparisons used by QuickSort is nondegenerate (extended abstract)

In a continuous-time setting, Fill (2012) proved, for a large class of probabilistic sources, that the number of symbol comparisons used by QuickSort, when centered by subtracting the mean and scaled by dividing by time, has a limiting distribution, but proved little about that limiting random variable Y —not even that it is nondegenerate. We establish the nondegeneracy of Y . The proof is perh...

متن کامل

M ay 2 00 1 Quicksort Asymptotics

The number of comparisons X n used by Quicksort to sort an array of n distinct numbers has mean µ n of order n log n and standard deviation of order n. Using different methods, Régnier and Rösler each showed that the normalized variate Y n := (X n −µ n)/n converges in distribution, say to Y ; the distribution of Y can be characterized as the unique fixed point with zero mean of a certain distri...

متن کامل

A local limit theorem for QuickSort key comparisons via multi-round smoothing

It is a well-known result, due independently to Régnier [8] and Rösler [10], that the number of key comparisons required by the randomized sorting algorithm QuickSort to sort a list of n distinct items (keys) satisfies a global distributional limit theorem. We resolve an open problem of Fill and Janson from 2002 by using a multi-round smoothing technique to establish the corresponding local lim...

متن کامل

Perfect simulation from the Quicksort limit distribution

The weak limit of the normalized number of comparisons needed by the Quicksort algorithm to sort n randomly permuted items is known to be determined implicitly by a distributional fixed-point equation. We give an algorithm for perfect random variate generation from this distribution.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1202.2601  شماره 

صفحات  -

تاریخ انتشار 2010